﻿@{
	Layout = "~/Views/Shared/_SimplePageLayout.cshtml";
}

<div class="clearfix">
	<br />
	<hr />
	<br />

	@using (Html.BeginForm("Login", "Account", FormMethod.Post, new { onsubmit = "return check_form()" }))
	{
		<div class="panel panel-default center-block" style="width:500px;">
			<div class="panel-heading">
				用户登录
			</div>

			<div class="panel-body form-horizontal">
				<div class="form-group">
					<label for="input_username" class="col-md-3 control-label">登录邮箱</label>
					<div class="col-md-8">
						<input type="email" class="form-control" id="txt_loginname" name="LoginName" placeholder="请输入登录邮箱" />
					</div>
				</div>

				<div class="form-group">
					<label for="input_password" class="col-md-3 control-label">密　　码</label>
					<div class="col-md-8">
						<input type="password" class="form-control" id="txt_password" name="Password" placeholder="请输入密码" />
					</div>
				</div>

				@*<div class="form-group">
					<div class="col-md-offset-3 col-md-7">
						<button type="submit" class="btn btn-info btn-sm"><span class="glyphicon glyphicon-user"></span> 登 录</button>
					</div>
				</div>*@
			</div>
			<div class="panel-footer text-right">
				<button type="submit" class="btn btn-info btn-sm"><span class="glyphicon glyphicon-user"></span> 登 录</button>
			</div>
		</div>
	}
</div>

@section scripts {
	<script type="text/javascript">
		function check_form() {
			if ($.trim($("#txt_loginname").val()) == '') {
				alert("请输入登录邮箱");
				$("#txt_loginname").focus();
				return false;
			}

			if ($.trim($("#txt_password").val()) == '') {
				alert("请输入密码");
				$("#txt_password").focus();
				return false;
			}

			return true;
		}
	</script>
}
